﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="TestDaLogga.aspx.cs" Inherits="stats.quirli.TestDaLogga" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <script type="text/javascript" src="./Scripts/jquery-1.4.1.js"></script>
</head>
<body>
<script type="text/javascript">
    function LogMediaLoadedByUser(mediaUrl) {
        $.ajax({
            url: 'Log.asmx/MediaLoadedByUser',
            data: "{ 'mediaUrl': '" + mediaUrl + "' }",
            type: "POST",
            contentType: "application/json; charset=utf-8",
            dataType: "json",
            success: function (data) {
                alert('insert was performed.');
                //$("#mydiv").empty();
                //$("#mydiv").html(data);
            },
            error: function (data, status, jqXHR) { alert(jqXHR); }
        });
    }
    function PlayerLoadedWithQuery(query) {
        $.ajax({
            url: 'Log.asmx/PlayerLoadedWithQuery',
            data: "{ 'query': '" + query + "' }",
            type: "POST",
            contentType: "application/json; charset=utf-8",
            dataType: "json",
            success: function (data) {
                alert('insert was performed.');
                //$("#mydiv").empty();
                //$("#mydiv").html(data);
            },
            error: function (data, status, jqXHR) { alert(jqXHR); }
        });
    }
    function SharingTrack(shareableQuery) {
        $.ajax({
            url: 'Log.asmx/SharingTrack',
            data: "{ 'shareableQuery': '" + shareableQuery + "' }",
            type: "POST",
            contentType: "application/json; charset=utf-8",
            dataType: "json",
            success: function (data) {
                alert('insert was performed.');
                //$("#mydiv").empty();
                //$("#mydiv").html(data);
            },
            error: function (data, status, jqXHR) { alert(jqXHR); }
        });
    }
</script>
    <form id="form1" runat="server">
    <div>

        <button onclick="LogMediaLoadedByUser('testurl');return false;" >ButtonMediaLoadedByUser</button>
         <button onclick="PlayerLoadedWithQuery('testquery');return false;" >PlayerLoadedWithQuery</button>
         <button onclick="SharingTrack('testshareableQuery');return false;" >SharingTrack</button>
  
    
    </div>
    </form>
</body>
</html>
